package ccpv;

public class Parameter {
  private double value;
  private String name;
  private Trend trend;
  
  public Parameter(double value, String name, Trend trend) {
	  this.setValue(value);
	  this.setName(name);
	  this.setTrend(trend);
  }
  
  public Parameter(double value, String name) {
	  this.setValue(value);
	  this.setName(name);
  }
  
  public Parameter(String name, double value) {
	  this.setValue(value);
	  this.setName(name);
  }
  
  public Parameter(String name) {
	  this.setValue(0);
	  this.setName(name);
  }

/**
 * @param value the value to set
 */
public void setValue(double value) {
	this.value = value;
}

/**
 * @return the value
 */
public double getValue() {
	return value;
}

/**
 * @param name the name to set
 */
public void setName(String name) {
	this.name = name;
}

/**
 * @return the name
 */
public String getName() {
	return name;
}
  
/* (non-Javadoc)
 * @see java.lang.Object#toString()
 */
public String toString() {
	return "("+ name + ", " + value + ")";
}

/**
 * @param trend the trend to set
 */
public void setTrend(Trend trend) {
	this.trend = trend;
}

/**
 * @return the trend
 */
public Trend getTrend() {
	return trend;
}

/**
 * Increments the parameter for the next step
 */

public void step() {
	if (trend != null) {
		value = trend.nextValue(value,0); // !!!!!!!!! this needs a time tic parameter
	} // else do nothing
}


}
